//
//  PrescriptionOrderLogisticsSectionHeader.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2021/8/18.
//  Copyright © 2021 QDSG. All rights reserved.
//

import UIKit

class PrescriptionOrderLogisticsSectionHeader: UIView {
    
    func bind(to viewModel: PrescriptionOrderLogisticsSectionViewModel, in section: Int) {
        titleLabel.text = viewModel.statusTitle
        
        titleLabel.textColor = section == 0 ? .main : .textDark
        titleView.backgroundColor = section == 0 ? .main : UIColor(hex: "#D8D8D8")
    }
    
    @IBOutlet private weak var titleLabel: UILabel!
    
    @IBOutlet private weak var titleView: UIView! {
        didSet {
            titleView.layer.cornerRadius = titleView.height / 2
        }
    }

}
